<?php
class menu_link_1 extends Update_Model_Database_AbstractChange{

	protected $comment="Создание таблицы menu_link";

	public function up(){
		$sql='CREATE TABLE IF NOT EXISTS menu_link(
  				  id INT(11) NOT NULL AUTO_INCREMENT,
				  label TEXT NOT NULL,
				  title TEXT DEFAULT NULL,
				  class VARCHAR(20) DEFAULT NULL,
				  target VARCHAR(20) DEFAULT NULL,
				  rel VARCHAR(20) DEFAULT NULL,
				  rev VARCHAR(20) DEFAULT NULL,
				  resource VARCHAR(60) DEFAULT NULL,
				  privilege VARCHAR(20) DEFAULT NULL,
				  visible TINYINT(1) DEFAULT 1,
				  page_id INT(11) DEFAULT NULL,
				  uri TEXT DEFAULT NULL,
				  ico TEXT DEFAULT NULL,
				  PRIMARY KEY (id)
				)
				CHARACTER SET utf8
				COLLATE utf8_general_ci;';
		$this->db->query($sql);
	}

	public function down(){
		$sql='DROP TABLE IF EXISTS menu_link;';
		$this->db->query($sql);
	}

}